﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fee.Mapping
{
    //public class FrameworkContractProjectMapping : IEntityTypeConfiguration<FrameworkContractProject>
    //{
    //    public void Configure(EntityTypeBuilder<FrameworkContractProject> builder)
    //    {
    //        builder.HasKey(t => new {t.ProjectId, t.FrameworkContractId});
    //        builder.HasOne(pt => pt.FrameworkContract);
    //        builder.HasOne(pt => pt.Project);


    //        builder
    //            .HasKey(t => new {t.FrameworkContractId, t.ProjectId});

    //        builder
    //            .HasOne(pt => pt.FrameworkContract)
    //            .WithMany(p => p.Projects)
    //            .HasForeignKey(pt => pt.ProjectId);

    //        builder
    //            .HasOne(pt => pt.Project)
    //            .WithMany(t => t.FrameworkContracts)
    //            .HasForeignKey(pt => pt.FrameworkContractId);

    //        builder.ToTable("fee_fwContractProj");
    //    }
    //}
}